//package com.wushi.lenovo.asia5b.app_utils.messenger;
//
//import android.app.Activity;
//import android.net.Uri;
//
//import com.facebook.share.model.ShareLinkContent;
//import com.facebook.share.model.ShareMessengerGenericTemplateContent;
//import com.facebook.share.model.ShareMessengerGenericTemplateElement;
//import com.facebook.share.model.ShareMessengerURLActionButton;
//import com.facebook.share.widget.MessageDialog;
//
///**
// * Created by zhangyuncai on 2019/1/11.
// */
//public class MessengerShare {
//    public static final String pageid = "312057982691415";
//
//    public static void share(Activity activity) {
//        String imgUrl = "http://imgsrc.baidu.com/imgad/pic/item/5243fbf2b21193139509fc466f380cd790238df9.jpg";
//        ShareMessengerURLActionButton actionButton =
//                new ShareMessengerURLActionButton.Builder()
//                        .setTitle("Visit Facebook")
//                        .setUrl(Uri.parse("https://www.facebook.com"))
//                        .build();
//        ShareMessengerGenericTemplateElement genericTemplateElement =
//                new ShareMessengerGenericTemplateElement.Builder()
//                        .setTitle("Visit Facebook")
//                        .setSubtitle("Visit Messenger")
////                        .setBigImageUrl(Uri.parse("heeps://Your/Image/Url"))
//                        .setBigImageUrl(Uri.parse(imgUrl))
//                        .setButton(actionButton)
//                        .build();
//        ShareMessengerGenericTemplateContent genericTemplateContent =
//                new ShareMessengerGenericTemplateContent.Builder()
//                        .setPageId(pageid) // Your page ID, required
//                        .setGenericTemplateElement(genericTemplateElement)
//                        .build();
//        MessageDialog.show(activity, genericTemplateContent);
//    }
//
//    public static void share2(Activity activity, String link) {
//        MessageDialog.show(activity, getLinkContent(link));
//    }
//
//    private static ShareLinkContent getLinkContent(String link) {
//        return new ShareLinkContent.Builder()
//                .setContentUrl(Uri.parse(link))
//                .setPageId("312057982691415")
//                .build();
//    }
//}
